package com.richpencil.modules.weixin.domain;

import java.util.Map;

public class UnifiedOrderObject {

    public boolean isSuccess() {
        return success;
    }
    public void setSuccess(boolean success) {
        this.success = success;
    }
    public String getOuttradeno() {
        return outtradeno;
    }
    public void setOuttradeno(String outtradeno) {
        this.outtradeno = outtradeno;
    }
    public boolean success=false;
    public String outtradeno="";

    public UnifiedOrderObject(Map<String, Object> map)
    {
        String returnCode = map.get("return_code").toString();
        if (returnCode.equalsIgnoreCase("SUCCESS")) {
            this.success=true;
        } else {
            this.success=false;
        }
        if(this.success) {
            this.outtradeno=  map.get("out_trade_no").toString();
        }
    }
    public UnifiedOrderObject()
    {

    }
}